#Makefile for ISBA soil model source files

include ../../mkfls_profs/Makefile.in
#include ./MakefileCheb.in
#include ./MakefileCheb_precise.in
#include MakefileBG.in

line_length_fixed_form=-132

objfiles = \
 $(objfile_path)/mathconsts.o \
 $(objfile_path)/physconsts.o \
 $(objfile_path)/physparams.o \
 $(objfile_path)/methaneconsts.o \
 \
 $(objfile_path)/inmsoil.o \
# \
 $(objfile_path)/addpreciptosnow.o \
 $(objfile_path)/call_dbgout.o \
 $(objfile_path)/comsoil.o \
 $(objfile_path)/dbgout.o \
 $(objfile_path)/drag3.o \
 $(objfile_path)/dragvl.o \
 $(objfile_path)/functions.o \
 $(objfile_path)/initsoil.o \
 $(objfile_path)/methane.o \
 $(objfile_path)/normalize.o \
 $(objfile_path)/pbldat.o \
 $(objfile_path)/pblflx.o \
 $(objfile_path)/pblflx_loczeros.o \
 $(objfile_path)/snow_calc.o \
 $(objfile_path)/soil.o \
 $(objfile_path)/soil_loczeros.o \
 $(objfile_path)/vinit.o \
 $(objfile_path)/vinit_loczeros.o

 all : $(objfiles)

# Compiling other source files
 $(objfile_path)/%.o : %.f 
	$(f90comp) $(opt_keys) $(check_keys) $(include_keys) $(formfree_key) $(keys) \
	$(line_length_fixed_form) $< -o $@

# $(objfile_path)/%.o : %.fi
#	$(f90comp) $(opt_keys) $(check_keys) $(include_keys) $(formfixed_key) $(keys) $< -o $@


# Cleaning *.o and *.mod files
 clean : 
	rm -f $(objfiles)
